package com.fastshopping.order.service;

import com.fastshopping.order.pojo.Order;
import com.github.pagehelper.Page;

import java.util.List;
import java.util.Map;

/*
 * @Author zhangdan
 * @Description //TODO 订单业务层接口
 * @Date 16:02 2020/6/1
 * @Param
 * @return
 **/
public interface OrderService {

    /*
     * @Author zhangdan
     * @Description //TODO 查询所有
     * @Date 17:24 2020/6/7
     * @Param []
     * @return java.util.List<com.fastshopping.order.pojo.Order>
     **/
    List<Order> findAll();

    /*
     * @Author zhangdan
     * @Description //TODO 根据ID查询
     * @Date 17:24 2020/6/7
     * @Param [id]
     * @return com.fastshopping.order.pojo.Order
     **/
    Order findById(String id);

    /*
     * @Author zhangdan
     * @Description //TODO 新增
     * @Date 17:24 2020/6/7
     * @Param [order]
     * @return void
     **/
    void add(Order order);

    /*
     * @Author zhangdan
     * @Description //TODO 修改
     * @Date 17:24 2020/6/7
     * @Param [order]
     * @return void
     **/
    void update(Order order);

    /*
     * @Author zhangdan
     * @Description //TODO 删除
     * @Date 17:24 2020/6/7
     * @Param [id]
     * @return void
     **/
    void delete(String id);

    /*
     * @Author zhangdan
     * @Description //TODO 多条件搜索
     * @Date 17:24 2020/6/7
     * @Param [searchMap]
     * @return java.util.List<com.fastshopping.order.pojo.Order>
     **/
    List<Order> findList(Map<String, Object> searchMap);

    /*
     * @Author zhangdan
     * @Description //TODO 分页查询
     * @Date 17:24 2020/6/7
     * @Param [page, size]
     * @return com.github.pagehelper.Page<com.fastshopping.order.pojo.Order>
     **/
    Page<Order> findPage(int page, int size);

    /*
     * @Author zhangdan
     * @Description //TODO 多条件分页查询
     * @Date 17:25 2020/6/7
     * @Param [searchMap, page, size]
     * @return com.github.pagehelper.Page<com.fastshopping.order.pojo.Order>
     **/
    Page<Order> findPage(Map<String, Object> searchMap, int page, int size);




}
